import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 徐海涛
 * Date: 2022-04-22
 * Time: 23:58
 */
public class Demo1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int row = scanner.nextInt();//行数
            int col = scanner.nextInt();//列数
            int[][] map = new int[row][col];
            // 两个for 循环 构造迷宫
            for (int i = 0; i < map.length; i++) {
                for (int j = 0; j < map[0].length; j++) {
                    map[i][j] = scanner.nextInt();
                }
            }



        }

    }

    public static void dfs() {
        // 1.终点位置


        // 顺时针试探

    }


}
